<%--
  Created by IntelliJ IDEA.
  User: haojianlei
  Date: 2018-11-23
  Time: 13:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title> - 查看邮件</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="favicon.ico">
    <link href="${pageContext.request.contextPath}/assets/shipui/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/assets/shipui/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/assets/shipui/css/animate.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/assets/shipui/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/assets/ship/ship.css" rel="stylesheet" >


</head>

<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-3">
            <div class="ibox float-e-margins">
                <div class="ibox-content mailbox-content">
                    <div class="file-manager" style="font-size: 14px;margin-left: 15px">

                        <ul class="folder-list m-b-md" style="padding: 0px">
                            <li>
                                <a href="toSystemHome.do"> <i class="fa fa-circle text-navy" style="color: #cad6f0"></i>企业信息</a>
                            </li>
                            <li>
                                <a href="toPersonalInfo.do"> <i class="fa fa-circle text-navy" style="color: #cad6f0;"></i>个人信息</a>
                            </li>
                            <li>
                                <a href="toStaffInfo.do"> <i class="fa fa-circle text-navy" style="color: #cad6f0"></i>员工管理</a>
                            </li>
                        </ul>

                        <ul class="folder-list m-b-md" style="padding: 0">
                            <li>
                                <a href="toGoodName.do"> <i class="fa fa-circle text-info" style="color: #f5e7d1"></i>货种名称配置</a>
                            </li>
                            <li>
                                <a href="toGooderName.do"> <i class="fa fa-circle text-info" style="color: #f5e7d1"></i>货主名称配置</a>
                            </li>
                            <li>
                                <a href="toLogistics.do"> <i class="fa fa-circle text-info" style="color: #f5e7d1"></i>港口名称配置</a>
                            </li>
                        </ul>

                        <ul class="folder-list m-b-md" style="padding: 0">
                            <li>
                                <a href="toRecharge.do"  style="color: #0d8ddb;font-weight: 700"><i class="fa fa-circle text-info" style="color: #0d8ddb"></i>账户充值</a>
                            </li>
                            <li>
                                <a href="toRechargeDetail.do"><i class="fa fa-circle text-info" style="color: #f0cad8"></i>充值记录</a>
                            </li>
                            <li>
                                <a href="toExpensesDetail.do"><i class="fa fa-circle text-info" style="color: #f0cad8"></i>消费记录</a>
                            </li>
                            <li>
                                <a href="toFindShipDetail.do"><i class="fa fa-circle text-info" style="color: #f0cad8"></i>找船记录</a>
                            </li>
                        </ul>

                        <div class="clearfix"></div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sm-9 animated fadeInRight">

            <div class="mail-box">

                <div class="mail-body">
                    <div class="row">
                        <div class="col-sm-6"> <h3>微信扫码支付：</h3></div>
                    </div>

                    <hr class="simple" color="#6f5499" />

                    <div class="row">
                        <div class="col-md-12">
                            <div class="card">
                                <div class="main-center">
                                    <div class="main-wrap deposit-wrap">
                                        <!--中间左边菜单列表-->
                                        <div class="go-deposit">
                                            <div class="go-deposit-box">
                                                <h5 class="go-deposit-title2">打开微信扫一扫完成付款</h5>
                                                <div class="go-deposit-submit2">
                                                    <img src="${wmpath}"  id="rimg" onclick="changeImg()">
                                                </div>
                                            </div>
                                        </div>
                                        <!--中间左边菜单列表 end-->
                                        <div class="clear"></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>


            <div class="clearfix"></div>


        </div>
    </div>
</div>
</div>


<!-- 全局js -->
<script src="${pageContext.request.contextPath}/assets/shipui/js/jquery.min.js?v=2.1.4"></script>
<script src="${pageContext.request.contextPath}/assets/shipui/js/qrcode.js"></script>
<script src="${pageContext.request.contextPath}/assets/shipui/js/bootstrap.min.js?v=3.3.6"></script>

<!-- 自定义js -->
<script src="${pageContext.request.contextPath}/assets/shipui/js/content.js?v=1.0.0"></script>
<script type="text/javascript">
    function changeImg(){
        var obj = document.getElementById("rimg");
        obj.src = "../assets/img/home/paySucess.png";
    }

    function checkstatus(orderno) {
        var url = 'checkstatus.do?reordernumber='+orderno;
        // 是否完成支付
        $.ajax({
            url:url,
            type:'post',
            dataType:'json',
            async:true,
            contentType: "application/json; charset=utf-8",
            success:  function(data) {
                var dataStr = data + "";
                if(dataStr == "true"){
                    changeImg();
                    settime();
                    return;
                }else {
                    setTimeout(function() {
                        checkstatus(orderno)
                    },1000)
                }
            },
            error  :  function(XMLHttpRequest, textStatus, errorThrown) {
                debugger;
                alert('error');
            }
        });
    }

    $(function(){
        checkstatus('${orderno}');
    });

    //计时
    var countdown = 3;
    function settime() {
        if (countdown == 0) {
            window.close();
            return;
        } else {
            countdown--;
        }
        setTimeout(function() {
            settime()
        },1000)
    }

</script>

</body>

</html>
